package org.stvd.service.common.impl;

import javax.annotation.Resource;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.stvd.entities.common.VerifyTmp;
import org.stvd.entities.common.VerifyTmpPK;
import org.stvd.repository.common.VerifyTmpDao;
import org.stvd.service.base.impl.BaseServiceImpl;
import org.stvd.service.common.VerifyTmpService;

@Service("verifyTmpService")
public class VerifyTmpServiceImpl extends BaseServiceImpl<VerifyTmp> implements VerifyTmpService {

    @Resource(name="VerifyTmpDao")
    private VerifyTmpDao verifyTmpDao;
    
    @Transactional
    @CacheEvict(value="adminCache",allEntries=true)
    public void updateVerifyTmp(VerifyTmp verifyTmp) {
        verifyTmpDao.update(verifyTmp);
    }
    
    public void deleteVerifyTmp(VerifyTmpPK verifyTmpPK) {
        verifyTmpDao.deleteVerifyTmp(verifyTmpPK);
    }

    public VerifyTmp findByPK(VerifyTmpPK verifyTmpPK) {
        return verifyTmpDao.findByPK(verifyTmpPK);
    }
}
